package org.xteam.sled.tree;

import java.util.List;

import org.xteam.sled.matcher.Arm;
import org.xteam.sled.model.AbsoluteField;
import org.xteam.sled.tree.TreeBuilder.SplitResult;

public class ChildDisjunctsHeuristic extends Heuristic {

	public ChildDisjunctsHeuristic() {
		super("childdisjuncts");
	}

	@Override
	public int run(TreeBuilder treeBuilder, List<SplitResult> children,
			AbsoluteField f) {
		int count = 0;
		for (SplitResult res : children) {
			for (Arm arm : res.arms) {
				count -= arm.getPattern().getDisjuncts().size();
			}
		}
		return 0;
	}

}
